<template>
	<view class="openVideo">
		<view class="back" @click="goBack">
			<uni-icons class="icon" type="left" size="24" color="#000000"></uni-icons>
		</view>
		<video v-if="url" class="video" :src="url" :autoplay="true" controls></video>
	</view>
</template>

<script>
	export default {
		data() {
			return {
				url: ''
			}
		},
		onLoad(option) {
			this.url = option.url;
		},
		methods: {
			goBack() {
				uni.navigateBack()
			}
		},
		components: {

		}
	}
</script>

<style lang="scss" scoped>
	.openVideo {
		height: 100%;

		.back {
			width: 70upx;
			height: 70upx;
			border-radius: 17upx;
			background-color: rgba(255, 255, 255, .4);
			position: absolute;
			top: 100upx;
			left: 42upx;
			z-index: 9;
			display: flex;
			align-items: center;
			justify-content: center;

			.icon {
				font-weight: bold;
			}
		}

		.video {
			width: 100%;
			height: 100%;
		}
	}
</style>